package com.bsoft.gol.hcs.specialist.entity;

import org.atag.dao.annotation.TableId;
import org.atag.dao.enums.IdType;

import javax.persistence.*;

/**
 * @author hekr22831
 * @description
 * @date 2022/5/25.21:01
 */
@Entity(name = "FollowPatientLabel")
@Table(name = "follow_patient_label")
public class FollowPatientLabelEntity {
    /**患者标签id*/
    private Long patientLabelId;
    /**院后随访id*/
    private Long fusPathRouteId;
    /**患者标签：0有纠纷,1,沟通欠佳,2诊断不清,3有投诉4本院职工*/
    private String disputeType;
    /**租户id*/
    private String tenantId;
    /**机构代码*/
    private String organizationId;
    /**住院号或门诊就诊序号*/
    private String visitNo;
    //类别 1,门诊2住院
    private Integer source;


    @Id
    @Column(name = "patient_label_id")
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getPatientLabelId() {
        return patientLabelId;
    }

    public void setPatientLabelId(Long patientLabelId) {
        this.patientLabelId = patientLabelId;
    }

    @Basic
    @Column(name = "fus_path_route_id")
    public Long getFusPathRouteId() {
        return fusPathRouteId;
    }

    public void setFusPathRouteId(Long fusPathRouteId) {
        this.fusPathRouteId = fusPathRouteId;
    }

    @Basic
    @Column(name = "dispute_type")
    public String getDisputeType() {
        return disputeType;
    }

    public void setDisputeType(String disputeType) {
        this.disputeType = disputeType;
    }

    @Basic
    @Column(name = "visit_no")
    public String getVisitNo() {
        return visitNo;
    }

    public void setVisitNo(String visitNo) {
        this.visitNo = visitNo;
    }

    @Basic
    @Column(name = "source")
    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    @Basic
    @Column(name = "tenant_id")
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Basic
    @Column(name = "organization_id")
    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FollowPatientLabelEntity)) return false;

        FollowPatientLabelEntity that = (FollowPatientLabelEntity) o;

        if (patientLabelId != null ? !patientLabelId.equals(that.patientLabelId) : that.patientLabelId != null)
            return false;
        if (fusPathRouteId != null ? !fusPathRouteId.equals(that.fusPathRouteId) : that.fusPathRouteId != null)
            return false;
        if (disputeType != null ? !disputeType.equals(that.disputeType) : that.disputeType != null) return false;
        if (tenantId != null ? !tenantId.equals(that.tenantId) : that.tenantId != null) return false;
        if (organizationId != null ? !organizationId.equals(that.organizationId) : that.organizationId != null)
            return false;
        if (visitNo != null ? !visitNo.equals(that.visitNo) : that.visitNo != null) return false;
        return source != null ? source.equals(that.source) : that.source == null;
    }

    @Override
    public int hashCode() {
        int result = patientLabelId != null ? patientLabelId.hashCode() : 0;
        result = 31 * result + (fusPathRouteId != null ? fusPathRouteId.hashCode() : 0);
        result = 31 * result + (disputeType != null ? disputeType.hashCode() : 0);
        result = 31 * result + (tenantId != null ? tenantId.hashCode() : 0);
        result = 31 * result + (organizationId != null ? organizationId.hashCode() : 0);
        result = 31 * result + (visitNo != null ? visitNo.hashCode() : 0);
        result = 31 * result + (source != null ? source.hashCode() : 0);
        return result;
    }
}
